package org.ihelpuoo.orm.handler.map;

import java.lang.reflect.Field;
import java.util.Map;

import org.ihelpuoo.orm.ObjectRule;
import org.ihelpuoo.orm.handler.ObjectProcessor;
import org.ihelpuoo.orm.handler.ReadNormalFieldHandler;

public class MapReadNormalFieldHandler extends ReadNormalFieldHandler
{

	public MapReadNormalFieldHandler(ObjectProcessor beanHandler)
	{
		super(beanHandler);
	}

	@Override
	protected Object evalObjectValue(ObjectRule r, Field f, Object src, String prefix) throws Exception
	{
		String key = r.getAlias(f);
		return ((Map)src).get(key);
	}

}
